home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / stnvjw20.zip / MYPATH.BAT next >
DOS Batch File  |  1992-10-25  |  723b  |  33 lines

  1. rem ***echo off
  2. rem ***cls
  3. rem    *** set my path and restores the old path ***
  4. if "%mypath%" == "mypath%%" goto cont
  5. if NOT "%1" == "" goto more
  6. rem    *** put the old path back ***
  7. setenv mypath %%chgup
  8. setenv path %%rep/%mypath%//
  9. rem    *** remove the save path ***
  10. setenv mypath=
  11. goto fini
  12. rem    *** path additions ***
  13. :cont
  14. if "%1" == "" goto def
  15. rem    *** save new info ***
  16. setenv mypath=;%1;
  17. rem    *** add to the existing path ***
  18. :add
  19. path %path%%mypath%
  20. goto fini
  21. rem    *** add my path defaults ***
  22. :def
  23. rem    *** save default info ***
  24. setenv mypath=;c:\dos;
  25. goto add
  26. rem    *** add more to path ***
  27. :more
  28. rem    *** add to save ***
  29. setenv mypath=%mypath%%1;
  30. rem    *** save new info ***
  31. path %path%%1;
  32. :fini
  33.